﻿<?xml version="1.0" encoding="utf-8" ?>
<AdoNetDataAccess connection="$ArticleDBConnection$" formatter="bizobj of ArticleForm(article,user)">

  <Sql>
    SELECT        ArticleFormUserResponses.id, ArticleFormUserResponses.lastUpdated, ArticleFormUserResponses.formData, Articles.id AS article_id,
    Articles.baseTitle AS article_baseTitle, Articles.translatedTitles AS atricle_translatedTitles, Users.id AS user_id, Users.userName AS user_userName
    FROM            ArticleFormUserResponses INNER JOIN
    Articles ON ArticleFormUserResponses.articleId = Articles.id INNER JOIN
    Users ON ArticleFormUserResponses.userId = Users.id
    WHERE        (Articles.id = @articleId AND ArticleFormUserResponses.userId = @userId)
    order by Articles.baseTitle,ArticleFormUserResponses.lastUpdated DESC
  </Sql>
  <Param name="articleId" type="UniqueIdentifier" />
  <Param name="userId" type="UniqueIdentifier" />
</AdoNetDataAccess>
